/***********************************************************************
 * @file kcore_influential_communitySearch.h
 * Date         Author      description
 * ==========   =========   =======================================
 * 2023-07-14   Teng Long   xx
 *
 * @Copyright (C)  2023 
***********************************************************************/
#ifndef __KCORE_INFLUENTIAL_COMMUNITYSEARCH_H__
#define __KCORE_INFLUENTIAL_COMMUNITYSEARCH_H__


/* Files includes  -----------------------------------------------------------*/
#include <bits/stdc++.h>
using namespace std;

/* Defines -------------------------------------------------------------------*/
#define edge_num 501200 + 100
#define node_num  100000 + 5


/* Functions ----------------------------------------------------------------*/

void add_edge_inNeighbor(int u, int v, double w);
void add_edge_outNeighbor(int u, int v, double w);
void read_dataset(string PATH, bool directed);
void get_weight(string PATH, int n);
set<int> get_K_Core(int k);
int Find(int x);
void Union(int x, int y);
void connected_components_search(set<int> seed, int n);
void calc_new_degree(vector<int> &comp, int k, int n);
void UPDATE(int v, int k);
void delete_edge(int u, int v);
void delete_node(int delete_node);
void influential_community_search(set<int> &seed, int n);
void Kcore_influential_Community_Search(int k, int n);
void Kcore_Community_Search(int k, int n);
void top_r_Kcore_influential_Community_Search(int k, int n, int r);
void dataForGraph(int k, int n);
#endif // __KCORE_INFLUENTIAL_COMMUNITYSEARCH_H__
